import java.util.Map;

/**
 * 类型
 */
public enum Type {
    MAN(1, "1"),
    WMEN(4, "4"),
    WOMAN(2, "2"),
    MEN(3, "3");
    private Integer key;
    private String value;

    Type(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static void main(String[] args) {
        Class<Type> typeClass = Type.class;
        Type[] constructors = typeClass.getEnumConstants();
        Type enumConstantDirectory = Enum.valueOf(typeClass, "MAN");
        Type[] values = Type.values();
        System.out.println(enumConstantDirectory);
        System.out.println(constructors[2]);
    }
}


